package com.giscloud.limp.controller;

import java.util.Arrays;
import java.util.List;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.beans.factory.annotation.Autowired;

import com.giscloud.limp.entity.CourtInfo;
import com.giscloud.limp.service.CourtInfoService;
import com.giscloud.limp.entity.dto.CourtInfoDTO;
import com.giscloud.datasource.page.PageInfo;
import com.giscloud.commons.model.Result;
import lombok.extern.log4j.Log4j2;
import org.springframework.web.bind.annotation.*;


/**
 * 法院信息
 *
 * @author giscloud
 * @email giscloud@giscloud.com
 * @date 2020-06-12 09:49:29
 */
@RestController
@RequestMapping("/limp/courtinfo")
@Log4j2
public class CourtInfoController {

    private final CourtInfoService courtInfoService;

    @Autowired
    public CourtInfoController(CourtInfoService courtInfoService) {
        this.courtInfoService = courtInfoService;
    }


    /**
     * 列表
     */
    @RequestMapping("/list")
    public Result<List<CourtInfo>> list(@RequestBody CourtInfoDTO courtInfoDTO){
        List<CourtInfo> list = courtInfoService.queryPage(courtInfoDTO);
        return Result.success(list);
    }




}
